package itheima.zuoye.test3;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入年龄和身高：");
        String name = sc.next();
        String[]  nameArr = name.split(",");
        if( nameArr.length == 2){
            int age = Integer.parseInt(nameArr[0]);
            double height = Double.parseDouble(nameArr[1]);
            System.out.println("年龄为：" + age +"岁"+ ",身高为：" + height);
        }else {
            System.out.println("输入数据格式有误！");
        }
    }
}
